<template>
	<view class="content">
		<button size="mini" @click="show">点击进行节假日查询</button>
		<view class="uni-title uni-common-mt">
			Vertical Scroll
			<text>\n纵向滚动</text>
		</view>
		<view>
			<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
				@scrolltolower="lower" @scroll="scroll">
				<view id="demo1" class="scroll-view-item uni-bg-red">A</view>
				<view id="demo2" class="scroll-view-item uni-bg-green">B</view>
				<view id="demo3" class="scroll-view-item uni-bg-blue">C</view>
			</scroll-view>
		</view>
		<view @tap="goTop" class="uni-link uni-center uni-common-mt">
			点击这里返回顶部
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '你好世界',
				data: "2021-05-21",
				key: "e8619145ba446eefe2501354e79476d6",
				detail: 1
			}
		},
		onLoad() {

		},
		methods: {
			show() {
				console.log("点击了");
				uni.request({
					url: `/api?date=2021-05-01&detail=1&key=e8619145ba446eefe2501354e79476d6`,
					method: "GET",
					// date: {data:"2021-05-01",detail:1,key:"e8619145ba446eefe2501354e79476d6"},
					header: {
						"content-type": "application/json"
					},
					success: function(res) {
						console.log(res)
					}
				})
			}
		}
	}
</script>

<style>

</style>
